home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / cvs-1_3.lha / cvs-1.3 / contrib / pcl-cvs / compile-all.el < prev    next >
Lisp/Scheme  |  1992-04-07  |  2KB  |  53 lines

  1. ;;;; compile-all.el,v 1.2 1992/04/07 20:49:10 berliner Exp
  2. ;;;; This file byte-compiles all .el files in pcl-cvs release 1.02.
  3. ;;;;
  4. ;;;; Copyright (C) 1991 Inge Wallin
  5. ;;;;
  6. ;;;; This file is part of the GNU Emacs lisp library, Elib.
  7. ;;;;
  8. ;;;; GNU Elib is free software; you can redistribute it and/or modify
  9. ;;;; it under the terms of the GNU General Public License as published by
  10. ;;;; the Free Software Foundation; either version 1, or (at your option)
  11. ;;;; any later version.
  12. ;;;;
  13. ;;;; GNU Elib is distributed in the hope that it will be useful,
  14. ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. ;;;; GNU General Public License for more details.
  17. ;;;;
  18. ;;;; You should have received a copy of the GNU General Public License
  19. ;;;; along with GNU Emacs; see the file COPYING.  If not, write to
  20. ;;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21. ;;;;
  22.  
  23.  
  24. (setq elib-files '("elib-node"
  25.            "elib-dll"
  26.            "cookie"
  27.            "pcl-cvs"))
  28.  
  29.  
  30. (defun compile-file-if-necessary (file)
  31.   "Compile the Elib file FILE if necessary.
  32.  
  33. This is done if FILE.el is newer than FILE.elc or if FILE.elc doesn't exist."
  34.   (let ((el-name (concat file ".el"))
  35.     (elc-name (concat file ".elc")))
  36.     (if (or (not (file-exists-p elc-name))
  37.         (file-newer-than-file-p el-name elc-name))
  38.     (progn
  39.       (message (format "Byte-compiling %s..." el-name))
  40.       (byte-compile-file el-name)))))
  41.  
  42.  
  43. (defun compile-pcl-cvs ()
  44.   "Byte-compile all uncompiled files of elib.
  45. Be sure to have . in load-path since a number of files in elib
  46. depend on other files and we always want the newer one even if
  47. a previous version of elib exists."
  48.  
  49.   (interactive)
  50.   (setq load-path (append '(".") load-path))
  51.   (mapcar (function compile-file-if-necessary)
  52.       elib-files))
  53.